﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tingjian.gas.service.Entities.Product;
using Tingjian.gas.service.EntityFrameworkCore;
using Tingjian.gas.service.QueryMaper;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Linq;

namespace Tingjian.gas.service.Repositories
{
    public class EfCoreGasMeterRepository : EfCoreRepository<serviceDbContext, GasMeter, long> ,IGasMeterRepository
    {
        public EfCoreGasMeterRepository(IDbContextProvider<serviceDbContext> dbContextProvider) : base(dbContextProvider)
        {
        }

        public async Task<IQueryable<GasMeter>> GetByQueryAsync(GasListQuery query)
        {
            var db = await GetDbContextAsync();

            var gasMeter = db.GasMeter.AsQueryable();
            return gasMeter;
        }

    }
}
